/*
 * SkadiEditor.java - Copyright Apr 13, 2012 Z Networks Group, Inc. All rights reserved.
 * Z Networks Group PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.andromeda.skadi.sandbox;

import com.andromeda.skadi.view.swing.BalloontipButton;
import com.andromeda.skadi.Application;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import org.jdesktop.swingx.JXPanel;

/**
 *
 * @author Dickinson Roman Arismendy Torres
 */
public class SkadiEditor extends JXPanel {

    private JXPanel contentPane;
    private Insets border;
    private BalloontipButton helpButton;
    private BalloontipButton commandsButton;
    private BalloontipButton validationButton;
    private ComponentFactory factory = Application.instance().getService(ComponentFactory.class);
    private JXPanel buddyPanel;
    private JComponent editorComponent;

    public SkadiEditor() {
        setBorder(BorderFactory.createEmptyBorder());
        setLayout(new GridBagLayout());
        GridBagConstraints c = new GridBagConstraints();
        c.gridx = 0;
        c.gridy = 0;
        c.gridheight = 1;
        c.gridwidth = 1;
        c.insets = new Insets(border.top, border.left, border.bottom, 0);
        c.anchor = GridBagConstraints.NORTHWEST;
        c.fill = GridBagConstraints.BOTH;
        add(getContentPane());
        c.gridx = 1;
        c.insets = new Insets(border.top, 0, border.bottom, border.right);
        add(buddyPanel);
    }

    private JXPanel getContentPane() {
        if (contentPane == null) {
            contentPane = factory.createComponent(JXPanel.class);
        }
        return contentPane;
    }
    
    

    private JXPanel createButtonsPanel() {
        JXPanel panel = factory.createComponent(JXPanel.class);
        panel.setLayout(new GridLayout(3, 1, 0, 0));
        panel.add(helpButton);
        panel.add(validationButton);
        panel.add(commandsButton);
        return panel;
    }
}
